package middle

import "gitee.com/wcs2/common/enums"

type middleStatusStruct struct {
	CREATED   enums.PositionEnum
	READY     enums.PositionEnum
	RELEASED  enums.PositionEnum
	EXCUTING  enums.PositionEnum
	EXCEPTION enums.PositionEnum
	CANCELED  enums.PositionEnum
	FINISHED  enums.PositionEnum
}

//中间层任务状态枚举
var MiddleTaskStatusEnum = &middleStatusStruct{
	CREATED: enums.PositionStruct{
		Code:    "created",
		Des:     "创建（OFS端创建）",
		PlcCode: 1,
	}, READY: enums.PositionStruct{
		Code:    "ready",
		Des:     "就绪（OFS端已发送）",
		PlcCode: 10,
	}, RELEASED: enums.PositionStruct{
		Code:    "released",
		Des:     "中间层确认接收",
		PlcCode: 20,
	}, EXCUTING: enums.PositionStruct{
		Code:    "excuting",
		Des:     "执行中（中间层确认任务执行）",
		PlcCode: 30,
	}, EXCEPTION: enums.PositionStruct{
		Code:    "exception",
		Des:     "异常（中间层确认任务异常）",
		PlcCode: 40,
	}, CANCELED: enums.PositionStruct{
		Code:    "cancled",
		Des:     "取消（中间层确认任务取消）",
		PlcCode: 50,
	}, FINISHED: enums.PositionStruct{
		Code:    "finished",
		Des:     "结束（完成）",
		PlcCode: 80,
	},
}
